import 'package:boss/ui/page/login/provider/login_provider.dart';
import 'package:boss/ui/page/login/widget/login_browser.dart';
import 'package:boss/ui/widget/quit_app.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:provider/provider.dart';
import 'package:router/annotation.dart';

@RouterConfig(LoginPage.pageName)
class LoginPage extends StatefulWidget {
  static const pageName = '/loginPage';

  @override
  _LoginPageState createState() => _LoginPageState('登录');
}

class _LoginPageState extends BaseState<LoginPage> {
  _LoginPageState(String pageName) : super(pageName);

  @override
  Widget build(BuildContext context) {
    ScreenUtil(width: 750, height: 1334).init(context);

    return QuitApp(
      child: ChangeNotifierProvider(
        create: (context) => LoginProvider(),
        child: Scaffold(
          body: LoginBrowser(),
        ),
      ),
    );
  }
}
